#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMouseEvent>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

signals:
    void sendMouseEnterSig(int id, bool isEnter);
    void sendMouseMoveEventSig(QMouseEvent* event);
    void sendMousePressEventSig(QMouseEvent* event);

protected:
    void mouseMoveEvent(QMouseEvent* event);
    void mousePressEvent(QMouseEvent *event);

private:
    Ui::MainWindow *ui;

    bool enterQWidget(QPoint pp, QWidget* qWidget);
    QPoint getPosInMainWindow(QWidget* qWidget);
    void paintEvent(QPaintEvent *event);
    void showDetail(QWidget *qWidget);
    void disableDetail(QWidget *qWidget);
};

#endif // MAINWINDOW_H
